<%--
  Created by IntelliJ IDEA.
  User: YYY-Work
  Date: 2017/5/9
  Time: 13:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<html>
<head>
    <title>Title</title>
    <meta charset="UTF-8">
    <title>AdminLTE | Data Tables</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>

    <script type="text/javascript" src="<%=basePath%>/js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/jquery.form.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/admin/utils.js"></script>
    <link href="../../css/bootstrap.min.css" media="all" rel="stylesheet" type="text/css"/>
    <script src="../../js/bootstrap.js" type="text/javascript"></script>
    <link href="<%=basePath%>/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
    <link href="<%=basePath%>/themes/explorer/theme.css" media="all" rel="stylesheet" type="text/css"/>
    <script src="<%=basePath%>/js/sortable.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/fileinput.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/locales/zh.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/locales/es.js" type="text/javascript"></script>
    <script src="<%=basePath%>/themes/explorer/theme.js" type="text/javascript"></script>
</head>
<body class="skin-blue">
<!-- header logo: style can be found in header.less -->

<!-- getHeader -->
<s:action name="getHeader" namespace="/privilege" executeResult="true"/>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- Left side column. contains the logo and sidebar -->

    <!-- getMenus -->
    <s:action name="getMenus" namespace="/privilege" executeResult="true"/>

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                <small>医生价格编辑</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li><a href="#">Tables</a></li>
                <li class="active">Data tables</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">

                        <div class="box box-danger">

                            <div class="box-body">

                                <form id="form" class="form-horizontal" enctype="multipart/form-data" method="post" action="<%=basePath%>/goodsprice/ajaxEditGoodsPriceList.action">
                                    <fieldset>
                                        <input style="display: none" value="${goodsPriceList.recid}" name="recid">
                                        <input style="display: none" value="${stuffList.stuffid}" name="serialIdno">
                                        <input style="display: none" value="${stuffList.entityid}" name="entityid">
                                        <!--医生姓名-->
                                        <div class="form-group">
                                            <label class="col-sm-1 control-label">姓名</label>
                                            <div class="col-sm-2">
                                                <input type="text" id="stuffName" name="stuffName" class="form-control" readonly value="${stuffList.stuffName}">
                                            </div>
                                        </div>

                                        <!--产品选择-->
                                        <div class="form-group">
                                            <label class="col-sm-1 control-label">产品选择</label>
                                            <div class="col-sm-2">
                                                <select class="form-control" name="goodsid" id="goodsid" disabled="disabled">
                                                    <s:iterator value="goodsLists" id="goodsList">
                                                        <option value="${goodsList.goodsid}">${goodsList.goodsName}</option>
                                                    </s:iterator>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-1 control-label">价格类型</label>
                                            <div class="col-sm-2">
                                                <select class="form-control" name="columnid" id="columnid"disabled="disabled">
                                                    <option value="1">用户付费</option>
                                                    <option value="2">医生入账</option>
                                                </select>
                                            </div>
                                        </div>

                                        <!--原价-->
                                        <div class="form-group">
                                            <label class="col-sm-1 control-label">原价</label>
                                            <div class="col-sm-2">
                                                <input type="number" name="price00" class="form-control" value="${not empty goodsPriceList.price00 ? goodsPriceList.price00 :'0'}">
                                            </div>
                                        </div>

                                        <!--现价-->
                                        <div class="form-group">
                                            <label class="col-sm-1 control-label">现价</label>
                                            <div class="col-sm-2">
                                                <input type="number" name="price" class="form-control" value="${not empty goodsPriceList.price ? goodsPriceList.price :'0'}">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-1" style="text-align: right">是否启用</label>
                                            <div class="controls col-sm-2">
                                                <label class="radio inline">
                                                    <input id="isInUse" name="isUsedFlag" type="radio" checked="checked" value="1">
                                                    启用
                                                </label>
                                                <label class="radio inline" style="margin-left: 30px">
                                                    <input id="isNotInUse" name="isUsedFlag" type="radio" value="0">
                                                    不启用
                                                </label>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-1"></label>
                                            <div class="controls col-sm-4">
                                                <button class="btn btn-primary" type="submit">保存</button>
                                            </div>
                                        </div>
                                    </fieldset>
                                </form>

                            </div><!-- /.box-body -->
                        </div><!-- /.box -->

                    </div><!-- /.box -->


                </div>
            </div>

        </section><!-- /.content -->
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->

</body>

<script type="text/javascript">
    var isUsedFlag=${goodsPriceList.isUsedFlag};

    $(document).ready(new function () {

        if (0==isUsedFlag)
        {
            $("#isNotInUse").attr('checked', true);
        }else
        {
            $("#isInUse").attr('checked', true);
        }

    })
</script>
</html>
